class Person:
    def __init__(self,name):
        self.name = name
        self.__age = 0

    def set_age(self,age):
        if age < 1 or age>150:
            print('该年龄不合法')
        else:
            self.__age = age

    def get_age(self):
        return self.__age

person1 = Person('张三')
print(person1.get_age())
person1.set_age(10)


print(person1._Person__age)